home *** CD-ROM | disk | FTP | other *** search
- /*
- File: UtilityClasses.cp
-
- Contains: Useful utility functions when using the Drag Manager.
-
- Written by: Dave Falkenburg
-
- Copyright: © 1993-1996 by Dave Falkenburg, all rights reserved.
-
- Change History (most recent first):
-
- */
-
- #include "UtilityClasses.h"
-
-
- TGraphicsContext::TGraphicsContext(GrafPtr aPort)
- {
- GetPort(&fOldPort);
- SetPort(aPort);
-
- fOldClip = NewRgn();
- GetClip(fOldClip);
- GetPenState(&fOldPenState);
- }
-
-
- TGraphicsContext::~TGraphicsContext()
- {
- SetClip(fOldClip);
- DisposeRgn(fOldClip);
- SetPenState(&fOldPenState);
- SetPort(fOldPort);
- }
-